﻿/// <reference path="../../../../Scripts/jquery-1.7.1.min.js" />
ObjReply = new function () {
    this.RequestId = 0;
    this.Content = "";
    this.TagSubmitReply = ".submit_comment";
    this.TagListReply = ".list-reply-item-ineed";

}
$(document).ready(function () {
    $(ObjReply.TagSubmitReply).click(function () {
        $(this).parents('.panel-reply-item-ineed').addClass("panel-reply-item-ineed-current");
        ObjReply.RequestId = $(this).parent().find(".RequestID").val();
        ObjReply.Content = $(this).parent().find(".txt_comment").val();
        $.ajax({
            type: "GET",
            url: "/Reply/PostReply",
            data: {
                RequestId: ObjReply.RequestId,
                Content: ObjReply.Content,
            },
            contentType: "application/json; charset=utf-8",
            dataType: "html",
            cache: false,
            success: function (data) {
                $('.panel-reply-item-ineed-current').before(data);
                fleXenv.fleXcrollMain($('.panel-reply-item-ineed-current').parents().parents().parents().parents().attr("id"));
                $('.panel-reply-item-ineed-current').removeClass('panel-reply-item-ineed-current');
            }
        });
        return false;
    })
})
